TYPE_LOGON = 1
TYPE_DISCONNECT = 2
TYPE_SITDOWN = 3
TYPE_DATE_REQUEST = 4
TYPE_REGISTER = 5
TYPE_BATCH_LOGON = 6

class BatchMsgLogon:
    def __init__(self, usernamebegin, usernameend):
        self.type = TYPE_BATCH_LOGON
        self.usernamebegin = usernamebegin
        self.usernameend = usernameend        

class MsgLogon:
    def __init__(self, username, password, deviceid=None):
        self.type = TYPE_LOGON
        self.username = username
        self.password = password
        self.deviceid = deviceid        
        
class MsgRegister:
    def __init__(self, deviceid):
        self.type = TYPE_REGISTER        
        self.deviceid = deviceid
        
class MsgDisconnect:
    def __init__(self, selfjidstr):
        self.type = TYPE_DISCONNECT
        self.selfjidstr = selfjidstr        
        
class MsgSitDown:
    def __init__(self, selfjidstr, scene, desk):
        self.type = TYPE_SITDOWN
        self.selfjidstr = selfjidstr
        self.scene = scene
        self.desk = desk
        
class MsgDateRequest:
    def __init__(self, selfjidstr, jidstr):
        self.type = TYPE_DATE_REQUEST
        self.selfjidstr = selfjidstr
        self.jidstr = jidstr
        
        